<!DOCTYPE html>
<html>
    <head>
        <script src="vue.js"></script>
    </head>
    <body>
    <div id="app">
        <button @click="add">添加学生</button>
        <button @click="del">删除学生</button>
        <table border="1" width="50%" style="border-collapse:collapse ">
        <tr>
        <th>班级</th>
        <th>姓名</th>
        <th>性别</th>
        <th>年龄</th>
        </tr>
        <tr align="center" v-for="item in students">
            <td>{{item.grade}}</td>
            <td>{{item.name}}</td>
            <td>{{item.gender}}</td>
            <td>{{item.age}}</td>
        </tr>
        </table>
    </div>
    <script src="demo17.js"></script>
</body>

</html>